<?php

class Default_Form_Signup extends Zend_Form
{

    public function init()
    {
        $stddecorators = array(
	        'ViewHelper',
	        'Errors',
	        array(array('data' => 'HtmlTag'), array('tag' => 'td', 'class'  => 'element')),
	        array('Label', array('tag' => 'td')),
	        array(array('row' => 'HtmlTag'), array('tag' => 'tr'))
    	);
		$buttondecorators = array(
     						   'ViewHelper',
						        array(array('data' => 'HtmlTag'), array('tag' => 'td', 'class'  => 'element')),
						        array(array('label' => 'HtmlTag'), array('tag' => 'td',  'placement' => 'prepend')),
						        array(array('row' => 'HtmlTag'), array('tag' => 'tr')),
		);
		$this->setDecorators(array(
        	'FormElements',
        	array('HtmlTag', array('tag' => 'table')),
        	'Form',
    	));
			
        $firstname = $this->createElement('text', 'first_name', array(
                            'label' => 'First Name: *',
                            'required' => TRUE,
                            'decorators' => $stddecorators
        ));

        $lastname = $this->createElement('text', 'last_name', array(
                            'label' => 'Last Name: *',
                            'required' => TRUE,
                            'decorators' => $stddecorators
        ));

        $email = $this->createElement('text', 'email', array(
                            'label' => 'E-mail: *',
                            'required' => TRUE,
                            'decorators' => $stddecorators
        ));

        $password = $this->createElement('password', 'password', array(
                            'label' => 'Password: *',
                            'required' => TRUE,
                            'decorators' => $stddecorators
        ));

        $confirmPassword = $this->createElement('password', 'confirmpassword', array(
                            'label' => 'Confirm Password: *',
                            'required' => TRUE,
                            'decorators' => $stddecorators
        ));

        $register = $this->createElement('submit', 'register', array(
                            'label' => 'Sign Uo',
                            'decorators' => $buttondecorators
        ));

        $this->addElements(array(
                    $firstname,
                    $lastname,
                    $email,
                    $password,
                    $confirmPassword,
                    $register
        ));
    }


}

